#!/user/bin/env python
# -*- coding: utf-8 -*-

class PHTMLGenerator:
	
	def __init__(self):
	
	
		pass
	
	def firstQuery(self, listTeachers, establishment, year):
		
		f = file("query1.html", "w")
		
		f.write("<html><body>")
		f.write("<head><meta http-equiv='content-type' content='text/html;charset=utf-8' /></head><h1>")
		f.write("Teachers per establishment per year</h1>")
		f.write(u"<h3>Establishment: " + str(establishment) + "</h3>")
		f.write(u"<h3>Year: " + str(year) + "</h3><br>")
		f.write("<ul>")
		
		for element in listTeachers:
			f.write(u"<li>" + str(element) + "</li>")
			pass
		
		f.write("</ul></body></html>")
		
		f.close()
	
	def secondQuery(self, listTeachers, establishment, year, categorie):
		
		f = file("query2.html", "w")
		
		f.write("<html><body>")
		f.write("<head><meta http-equiv='content-type' content='text/html;charset=utf-8' /></head><h1>")
		f.write("Teachers per establishment per year</h1>")
		f.write(u"<h3>Establishment: " + str(establishment) + "</h3>")
		f.write(u"<h3>Year: " + str(year) + "</h3>")
		f.write(u"<h3>Year: " + str(categorie) + "</h3><br>")
		f.write("<ul>")
		
		for element in listTeachers:
			f.write(u"<li>" + str(element) + "</li>")
			pass
		
		f.write("</ul></body></html>")
		
		f.close()
		pass
		
	def thirdQuery(self, listTeachers, establishment, degree):
		f = file("query3.html", "w")
		
		f.write("<html><body>")
		f.write("<head><meta http-equiv='content-type' content='text/html;charset=utf-8' /></head><h1>")
		f.write("Teachers per establishment per year</h1>")
		f.write(u"<h3>Establishment: " + str(establishment) + "</h3>")
		f.write(u"<h3>Year: " + str(year) + "</h3>")
		f.write(u"<h3>Year: " + str(degree) + "</h3><br>")
		f.write("<ul>")
		
		for element in listTeachers:
			f.write(u"<li>" + str(element) + "</li>")
			pass
		
		f.write("</ul></body></html>")
		
		f.close()
		pass
		
